List Message
To send a list message, you must assemble an interactive object of type list with the following components:
Object | Description |
---|---|
header | Optional. If you decide to include it, you must set the header’s type to text and add a text field with the desired content. Maximum of 60 characters. |
body | Required. Your message’s body. Maximum of 1024 characters. |
footer | Optional. Your message’s footer. |
action | Required. Inside action, you must nest: - a button field with your button’s content, maximum of 20 characters - at least one section object (maximum of 10) with a maximum of 24 characters for the title for section Inside section, you must add at least one rows object. Maximum of 24 characters for the title for a row and maximum of 72 characters for the description for a row. |
Payload
{
"messages": [
{
"sender": "9180XXXXXX",
"to": "9199XXXXXX",
"messageId": "",
"transactionId": "",
"callbackDlrUrl": "",
"channel": "wa",
"type": "interactive",
"interactive": {
"type": "list",
"header": {
"type": "text",
"text": "hello there"
},
"body": {
"text": "abcd"
},
"footer": {
"text": ""
},
"action": {
"button": "Submit",
"sections": [
{
"title": "Chawla",
"rows": [
{
"id": "id1",
"title": "Laptop",
"description": ""
}
]
},
{
"title": "HELLOOOOOO",
"rows": [
{
"id": "id2",
"title": "computer",
"description": ""
}
]
}
]
}
}
}
],
"responseType": "json"
}
Note : Calback URL is a optional paramter . Please use when you want to change the default URL(configured through smartta). It will only chnage the domain name othere paratemters will be same as configurated in smartta.